<!DOCTYPE Html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>javascript project | sidenav</title>


  <link rel="stylesheet" href="../assets/css/sidenav.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
</head>

<body id="color">

  <div class="sidenav" id="function">
    <a href="#"><i class="fa fa-home"></i></a>
    <a href="#"><i class="fa fa-tachometer"></i></a>
    <a href="#"><i class="fa fa-cube"></i> </a>
    <a href="#"><i class="fa fa-user"></i></a>
    <a href="#"><i class="fa fa-product-hunt"></i></a>
    <a href="#"><i class="fa fa-cog"></i></a>
  </div>

  <div class="rotate" onclick="show()" id="colorful">

  </div>


  <!-- javascript -->
  <script>

    function show() {
      document.getElementById('function').classList.toggle('active');
    }

    function color() {
      document.getElementById("color").classList.toggle("color");
    }

    $(document).ready(function () {
      $("#colorful").on("click", function () {
        $("#color").toggleClass("change");
      });
    });
  </script>


</body>

</html>